Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(vue): use event modifiers to enhance readability #1280

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

Psycarlo
Copy link
Contributor

Instead of using the arrow function:

(e) => {
  e.preventDefault()
  e.stopPropagation()
  form.handleSubmit()
}

we can just use event modifiers like this:

@submit.prevent.stop="form.handleSubmit"

enhancing readability ✨

Copy link
Member

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@crutchcorn crutchcorn merged commit f8348e3 into TanStack:main Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants